//
//  FeedBackController.m
//  Yearly Plan
//
//  Created by admin on 2019/2/28.
//  Copyright © 2019年 admin. All rights reserved.
//

#import "FeedBackController.h"

@interface FeedBackController ()
@property (weak, nonatomic) IBOutlet UITextView *textViews;
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;

@end

@implementation FeedBackController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"Feedback";
    self.view.backgroundColor = HEX_COLOR(0xF1F1F1);
    self.textViews.layer.cornerRadius = 8;
    self.textViews.placeholder = @"Input feedback";
    self.textViews.placeholderColor = [UIColor lightGrayColor];
    self.commitBtn.layer.cornerRadius = 8;
    self.commitBtn.backgroundColor = HEX_COLOR(0xF7CE47);
}

- (IBAction)commitBtnClick:(id)sender {
    NSString *str = [self.textViews.text copy];
    if (str.length>0) {
        [self showHint:@"Success"];
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2. * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
            [self.navigationController popViewControllerAnimated:YES];
        });
    } else {
        [self showHint:@"Please enter feedback"];
    }
}


@end
